<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script type="text/javascript">
    $.ajax({
        type: "Get",
        url: "servlet/JJJJ",
        success: function (data) {
            $("#json").text(data);
        }
    })
</script>
<body>
<form action="#">
    用户名:<label> <input type="text" name="username"></label> <br>
    密码:<label> <input type="password" name="password"></label><br>
    <input type="button" value="提交" id="submit">
</form>

</body>
</html>